#!/bin/bash
install_dir=/home/dike
temp_dir=$install_dir/demo-`date +%s`
log_dir=$install_dir/audit
mkdir -p "$temp_dir"
tail -n +14 $0 | tar -zxf - -C "$temp_dir" > /dev/null 2>&1
pushd "$temp_dir"/scripts > /dev/null
	/bin/bash install.sh "$temp_dir" $0 2>&1 >> "$log_dir"/install.log
	cur_path=`pwd`
	echo "bin.template path: $cur_path"
popd > /dev/null
[ -e $install_dir/_demo_failed ] && exit 1
exit 0
